#ifndef DIALOG_H
#define DIALOG_H

#include <QDialog>
#include <QTimer>
#include <QDir>
#include <QFileInfoList>

namespace Ui {
class Dialog;
}

class Dialog : public QDialog
{
    Q_OBJECT

public slots:
    void flush();
    
public:
    explicit Dialog(QWidget *parent = 0);
    ~Dialog();
    
private:
    Ui::Dialog *ui;
    QTimer timer;
    QDir dir;
    QFileInfoList fileInfoList;

    int mem_total, mem_free;
    unsigned long long cpu_total;
    unsigned long long cpu_total_used;
    unsigned long long pre_cpu_total;
    unsigned long long pre_cpu_total_used;
    int cpu_percent_used;

    void memoryInfo();
    void cpuInfo();

};

#endif // DIALOG_H
